package day4.demo2_lambd;

import org.junit.Test;

import java.util.Locale;

public class TestDemo {
    String handle(String s,Fun f){
        return f.getValue(s);
    }
    @Test
    public void m1(){
        String s = handle("hello", new Fun() {
            @Override
            public String getValue(String s) {
                return s.toUpperCase();
            }
        });
        Fun f = t->t.toUpperCase();

        s = handle("hello",t->t.toUpperCase());
        s = handle("RddSoo",t->t.toLowerCase());
        s = handle("Hello",t->t.substring(0,2));
        System.out.println(s);
    }
}
